<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body class="timo-layout-page">
    <div class="layui-card">
        <div class="layui-card-header timo-card-header">
            <span><i class="fa fa-bars"></i> 置顶设置管理</span>
            <i class="layui-icon layui-icon-refresh refresh-btn"></i>
        </div>
        <div class="layui-card-body">
            <div class="layui-row timo-card-screen">
                <div class="pull-left layui-form-pane timo-search-box">
                     
                </div>
                <div class="pull-right screen-btn-group">
                    <button class="layui-btn open-popup" data-title="添加置顶设置" th:attr="data-url=@{/message/messageTop/add}" data-size="max">
                        <i class="fa fa-plus"></i> 添加</button>
                     
                </div>
            </div>
            <div class="timo-table-wrap">
                <table class="layui-table timo-table">
                    <thead>
                    <tr>
                        <th class="timo-table-checkbox">
                            <label class="timo-checkbox"><input type="checkbox">
                                <i class="layui-icon layui-icon-ok"></i></label>
                        </th>
                        <th>主键ID</th>
                        <th>时长选择</th>
                        <th>次数（次）</th>                        
                        <th>价格（元）</th>
                        <th>顺序</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="item:${list}">
                        <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                            <i class="layui-icon layui-icon-ok"></i></label></td>
                        <td th:text="${item.id}">主键ID</td>
                        <td th:switch="${item.day}">
                        <p th:case="1">7天</p>
                        <p th:case="2">半月</p>
                        <p th:case="3">一个月</p>
                        <p th:case="4">一季度</p>
                        <p th:case="5">半年</p>
                        <p th:case="6">一年</p>
                        </td>
                        <td th:text="${item.times}">次数</td>
                        <td th:text="${item.curmoney}">当地价格</td>
                        <td th:text="${item.num}">顺序</td>
                        <td>
                            <a class="open-popup" data-title="编辑置顶设置" th:attr="data-url=@{'/message/messageTop/edit/'+${item.id}}" data-size="max" href="#">编辑</a>
                            <a class="open-popup" data-title="详细信息" th:attr="data-url=@{'/message/messageTop/detail/'+${item.id}}" data-size="max" href="#">详细</a>
                            <a class="ajax-get" data-msg="您是否确认删除" th:href="@{/message/messageTop/status/delete(ids=${item.id})}">删除</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div th:replace="/common/fragment :: page"></div>
        </div>
    </div>
<script th:replace="/common/template :: script"></script>
</body>
</html>